package org.sakila.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.sakila.dao.SakilaDao;
import org.sakila.entities.Film;
import org.sakila.service.SakilaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SakilaServiceImpl implements SakilaService {
    @Autowired
    private SakilaDao sakilaDao;

    @Override
    public Film getFilmById(Long id) {
//        return sakilaDao.getFilmById(id);
        return sakilaDao.getFilmById(id);
    }

    @Override
    public List<Film> getFilms(Integer start, Integer size) {
        return sakilaDao.getFilms(start, size);
    }

    @Override
    public int createFilm(Film film) {
        return 0;
    }
}
